{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "hTh-bzLxHNlO"
      },
      "outputs": [],
      "source": [
        "\n",
        "import pandas as pd\n",
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "from mpl_toolkits.axes_grid1 import ImageGrid\n",
        "from pyts.image import GramianAngularField, MarkovTransitionField\n",
        "from pyts.datasets import load_gunpoint\n",
        "from sklearn.metrics.pairwise import cosine_similarity\n",
        "from sklearn.metrics.pairwise import pairwise_distances\n",
        "from sklearn.utils import resample\n",
        "from imblearn.combine import SMOTETomek\n",
        "from imblearn.over_sampling import SMOTE\n",
        "from imblearn.under_sampling import TomekLinks, NearMiss\n",
        "from sklearn.model_selection import train_test_split\n",
        "\n",
        "import torch\n",
        "import torch.nn as nn\n",
        "import torch.nn.functional as F\n",
        "import torch.optim as optim\n",
        "import torchvision\n",
        "from torchvision import datasets, transforms\n",
        "from torch.utils.data import DataLoader, Dataset,TensorDataset\n",
        "\n",
        "from matplotlib import colors\n",
        "from IPython import display\n",
        "import os\n",
        "from torch.utils.data.dataset import Dataset\n",
        "from matplotlib.pyplot import imread\n",
        "import glob\n",
        "import os\n",
        "import random\n",
        "from sklearn.preprocessing import LabelEncoder\n",
        "\n",
        "from torchvision.models import alexnet, vgg16, resnet152, resnet18, vgg19\n",
        "\n",
        "%matplotlib inline\n",
        "\n",
        "from torch.distributions.utils import lazy_property\n",
        "import math\n",
        "import h5py\n",
        "from PIL import Image\n",
        "\n",
        "\n",
        "import torch.nn.functional as nnf\n",
        "from torch.utils.data import random_split\n",
        "from torch.optim import SGD\n",
        "from torch.distributions import constraints\n",
        "import torchvision as torchv\n",
        "import torchvision.transforms as torchvt\n",
        "import pickle\n",
        "from sklearn.preprocessing import StandardScaler, MinMaxScaler"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "r-nK1YOMHNlP"
      },
      "outputs": [],
      "source": [
        "df_hb_train = pd.read_csv('D:/ShaftesBury/Anika_Presentation/Heartbeat-Classification-master/ptbdb_abnormal.csv',header = None)\n",
        "df_hb_test = pd.read_csv('D:/ShaftesBury/Anika_Presentation/Heartbeat-Classification-master/ptbdb_normal.csv', header = None)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-MVxjuJNHNlQ",
        "outputId": "0a485722-1e2d-4ae5-8d77-4c1c39dc70eb"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>0</th>\n",
              "      <th>1</th>\n",
              "      <th>2</th>\n",
              "      <th>3</th>\n",
              "      <th>4</th>\n",
              "      <th>5</th>\n",
              "      <th>6</th>\n",
              "      <th>7</th>\n",
              "      <th>8</th>\n",
              "      <th>9</th>\n",
              "      <th>...</th>\n",
              "      <th>178</th>\n",
              "      <th>179</th>\n",
              "      <th>180</th>\n",
              "      <th>181</th>\n",
              "      <th>182</th>\n",
              "      <th>183</th>\n",
              "      <th>184</th>\n",
              "      <th>185</th>\n",
              "      <th>186</th>\n",
              "      <th>187</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0.932233</td>\n",
              "      <td>0.869679</td>\n",
              "      <td>0.886186</td>\n",
              "      <td>0.929626</td>\n",
              "      <td>0.908775</td>\n",
              "      <td>0.933970</td>\n",
              "      <td>0.801043</td>\n",
              "      <td>0.749783</td>\n",
              "      <td>0.687229</td>\n",
              "      <td>0.635100</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.606941</td>\n",
              "      <td>0.384181</td>\n",
              "      <td>0.254237</td>\n",
              "      <td>0.223567</td>\n",
              "      <td>0.276836</td>\n",
              "      <td>0.253430</td>\n",
              "      <td>0.184826</td>\n",
              "      <td>0.153349</td>\n",
              "      <td>0.121872</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.951613</td>\n",
              "      <td>0.923963</td>\n",
              "      <td>0.853303</td>\n",
              "      <td>0.791859</td>\n",
              "      <td>0.734255</td>\n",
              "      <td>0.672043</td>\n",
              "      <td>0.685100</td>\n",
              "      <td>0.670507</td>\n",
              "      <td>0.667435</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>0.977819</td>\n",
              "      <td>0.899261</td>\n",
              "      <td>0.230129</td>\n",
              "      <td>0.032348</td>\n",
              "      <td>0.142329</td>\n",
              "      <td>0.223660</td>\n",
              "      <td>0.328096</td>\n",
              "      <td>0.367837</td>\n",
              "      <td>0.381701</td>\n",
              "      <td>0.389094</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0.935618</td>\n",
              "      <td>0.801661</td>\n",
              "      <td>0.805815</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.722741</td>\n",
              "      <td>0.480789</td>\n",
              "      <td>0.454829</td>\n",
              "      <td>0.319834</td>\n",
              "      <td>0.266874</td>\n",
              "      <td>0.308411</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>5 rows × 188 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "        0         1         2         3         4         5         6    \\\n",
              "0  0.932233  0.869679  0.886186  0.929626  0.908775  0.933970  0.801043   \n",
              "1  1.000000  0.606941  0.384181  0.254237  0.223567  0.276836  0.253430   \n",
              "2  1.000000  0.951613  0.923963  0.853303  0.791859  0.734255  0.672043   \n",
              "3  0.977819  0.899261  0.230129  0.032348  0.142329  0.223660  0.328096   \n",
              "4  0.935618  0.801661  0.805815  1.000000  0.722741  0.480789  0.454829   \n",
              "\n",
              "        7         8         9    ...  178  179  180  181  182  183  184  185  \\\n",
              "0  0.749783  0.687229  0.635100  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "1  0.184826  0.153349  0.121872  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "2  0.685100  0.670507  0.667435  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "3  0.367837  0.381701  0.389094  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "4  0.319834  0.266874  0.308411  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "\n",
              "   186  187  \n",
              "0  0.0  1.0  \n",
              "1  0.0  1.0  \n",
              "2  0.0  1.0  \n",
              "3  0.0  1.0  \n",
              "4  0.0  1.0  \n",
              "\n",
              "[5 rows x 188 columns]"
            ]
          },
          "execution_count": 7,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "RTJ5neOLHNlQ",
        "outputId": "e99e9ced-6e18-4cfa-a044-2f05a5d58a78"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(4046, 188)"
            ]
          },
          "execution_count": 8,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_test.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "uHJaBkXoHNlQ",
        "outputId": "061a1269-8aef-4edf-9ba6-ee6b57e2f12b"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "1.0    10506\n",
              "Name: 187, dtype: int64"
            ]
          },
          "execution_count": 9,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train[187].value_counts()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "OtPCjwHlHNlQ",
        "outputId": "600ed7d3-5e04-422b-bd47-a047e8e75a61"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "0.0    4046\n",
              "Name: 187, dtype: int64"
            ]
          },
          "execution_count": 10,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_test[187].value_counts()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "GF_4CrhOHNlR",
        "outputId": "4b551674-124e-4ad9-c30e-ee85c88b5fb1"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>0</th>\n",
              "      <th>1</th>\n",
              "      <th>2</th>\n",
              "      <th>3</th>\n",
              "      <th>4</th>\n",
              "      <th>5</th>\n",
              "      <th>6</th>\n",
              "      <th>7</th>\n",
              "      <th>8</th>\n",
              "      <th>9</th>\n",
              "      <th>...</th>\n",
              "      <th>178</th>\n",
              "      <th>179</th>\n",
              "      <th>180</th>\n",
              "      <th>181</th>\n",
              "      <th>182</th>\n",
              "      <th>183</th>\n",
              "      <th>184</th>\n",
              "      <th>185</th>\n",
              "      <th>186</th>\n",
              "      <th>187</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>0 rows × 188 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "Empty DataFrame\n",
              "Columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, ...]\n",
              "Index: []\n",
              "\n",
              "[0 rows x 188 columns]"
            ]
          },
          "execution_count": 11,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train[df_hb_train[187] == 3]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "6Ah1SP03HNlR",
        "outputId": "70eb6205-86d8-4499-d71c-4ed4c9d9446a"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(641, 188)"
            ]
          },
          "execution_count": 8,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train[df_hb_train[187] == 3].shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "JUUqoBtbHNlR",
        "outputId": "a25bbe9e-ac94-4a5c-8830-cf5107b32a96"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(87554, 188)"
            ]
          },
          "execution_count": 9,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "7NMZqbrdHNlR",
        "outputId": "c35b5bb2-0208-4b1a-8830-997844a2bd04"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(21892, 188)"
            ]
          },
          "execution_count": 10,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_test.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "c-7Ea_6OHNlR",
        "outputId": "9b7117c4-8f10-4d06-cf74-1774489ed8fe"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>0</th>\n",
              "      <th>1</th>\n",
              "      <th>2</th>\n",
              "      <th>3</th>\n",
              "      <th>4</th>\n",
              "      <th>5</th>\n",
              "      <th>6</th>\n",
              "      <th>7</th>\n",
              "      <th>8</th>\n",
              "      <th>9</th>\n",
              "      <th>...</th>\n",
              "      <th>178</th>\n",
              "      <th>179</th>\n",
              "      <th>180</th>\n",
              "      <th>181</th>\n",
              "      <th>182</th>\n",
              "      <th>183</th>\n",
              "      <th>184</th>\n",
              "      <th>185</th>\n",
              "      <th>186</th>\n",
              "      <th>187</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0.977941</td>\n",
              "      <td>0.926471</td>\n",
              "      <td>0.681373</td>\n",
              "      <td>0.245098</td>\n",
              "      <td>0.154412</td>\n",
              "      <td>0.191176</td>\n",
              "      <td>0.151961</td>\n",
              "      <td>0.085784</td>\n",
              "      <td>0.058824</td>\n",
              "      <td>0.049020</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>0.960114</td>\n",
              "      <td>0.863248</td>\n",
              "      <td>0.461538</td>\n",
              "      <td>0.196581</td>\n",
              "      <td>0.094017</td>\n",
              "      <td>0.125356</td>\n",
              "      <td>0.099715</td>\n",
              "      <td>0.088319</td>\n",
              "      <td>0.074074</td>\n",
              "      <td>0.082621</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.659459</td>\n",
              "      <td>0.186486</td>\n",
              "      <td>0.070270</td>\n",
              "      <td>0.070270</td>\n",
              "      <td>0.059459</td>\n",
              "      <td>0.056757</td>\n",
              "      <td>0.043243</td>\n",
              "      <td>0.054054</td>\n",
              "      <td>0.045946</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>0.925414</td>\n",
              "      <td>0.665746</td>\n",
              "      <td>0.541436</td>\n",
              "      <td>0.276243</td>\n",
              "      <td>0.196133</td>\n",
              "      <td>0.077348</td>\n",
              "      <td>0.071823</td>\n",
              "      <td>0.060773</td>\n",
              "      <td>0.066298</td>\n",
              "      <td>0.058011</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0.967136</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.830986</td>\n",
              "      <td>0.586854</td>\n",
              "      <td>0.356808</td>\n",
              "      <td>0.248826</td>\n",
              "      <td>0.145540</td>\n",
              "      <td>0.089202</td>\n",
              "      <td>0.117371</td>\n",
              "      <td>0.150235</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>5 rows × 188 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "        0         1         2         3         4         5         6    \\\n",
              "0  0.977941  0.926471  0.681373  0.245098  0.154412  0.191176  0.151961   \n",
              "1  0.960114  0.863248  0.461538  0.196581  0.094017  0.125356  0.099715   \n",
              "2  1.000000  0.659459  0.186486  0.070270  0.070270  0.059459  0.056757   \n",
              "3  0.925414  0.665746  0.541436  0.276243  0.196133  0.077348  0.071823   \n",
              "4  0.967136  1.000000  0.830986  0.586854  0.356808  0.248826  0.145540   \n",
              "\n",
              "        7         8         9    ...  178  179  180  181  182  183  184  185  \\\n",
              "0  0.085784  0.058824  0.049020  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "1  0.088319  0.074074  0.082621  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "2  0.043243  0.054054  0.045946  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "3  0.060773  0.066298  0.058011  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "4  0.089202  0.117371  0.150235  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "\n",
              "   186  187  \n",
              "0  0.0  0.0  \n",
              "1  0.0  0.0  \n",
              "2  0.0  0.0  \n",
              "3  0.0  0.0  \n",
              "4  0.0  0.0  \n",
              "\n",
              "[5 rows x 188 columns]"
            ]
          },
          "execution_count": 11,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train.head(5)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "s4l-DgLXHNlR",
        "outputId": "00a8ab09-6898-427f-df6a-b6cb2f4697e6"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>0</th>\n",
              "      <th>1</th>\n",
              "      <th>2</th>\n",
              "      <th>3</th>\n",
              "      <th>4</th>\n",
              "      <th>5</th>\n",
              "      <th>6</th>\n",
              "      <th>7</th>\n",
              "      <th>8</th>\n",
              "      <th>9</th>\n",
              "      <th>...</th>\n",
              "      <th>178</th>\n",
              "      <th>179</th>\n",
              "      <th>180</th>\n",
              "      <th>181</th>\n",
              "      <th>182</th>\n",
              "      <th>183</th>\n",
              "      <th>184</th>\n",
              "      <th>185</th>\n",
              "      <th>186</th>\n",
              "      <th>187</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>87549</th>\n",
              "      <td>0.807018</td>\n",
              "      <td>0.494737</td>\n",
              "      <td>0.536842</td>\n",
              "      <td>0.529825</td>\n",
              "      <td>0.491228</td>\n",
              "      <td>0.484211</td>\n",
              "      <td>0.456140</td>\n",
              "      <td>0.396491</td>\n",
              "      <td>0.284211</td>\n",
              "      <td>0.136842</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>87550</th>\n",
              "      <td>0.718333</td>\n",
              "      <td>0.605000</td>\n",
              "      <td>0.486667</td>\n",
              "      <td>0.361667</td>\n",
              "      <td>0.231667</td>\n",
              "      <td>0.120000</td>\n",
              "      <td>0.051667</td>\n",
              "      <td>0.001667</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.013333</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>87551</th>\n",
              "      <td>0.906122</td>\n",
              "      <td>0.624490</td>\n",
              "      <td>0.595918</td>\n",
              "      <td>0.575510</td>\n",
              "      <td>0.530612</td>\n",
              "      <td>0.481633</td>\n",
              "      <td>0.444898</td>\n",
              "      <td>0.387755</td>\n",
              "      <td>0.322449</td>\n",
              "      <td>0.191837</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>87552</th>\n",
              "      <td>0.858228</td>\n",
              "      <td>0.645570</td>\n",
              "      <td>0.845570</td>\n",
              "      <td>0.248101</td>\n",
              "      <td>0.167089</td>\n",
              "      <td>0.131646</td>\n",
              "      <td>0.121519</td>\n",
              "      <td>0.121519</td>\n",
              "      <td>0.118987</td>\n",
              "      <td>0.103797</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>87553</th>\n",
              "      <td>0.901506</td>\n",
              "      <td>0.845886</td>\n",
              "      <td>0.800695</td>\n",
              "      <td>0.748552</td>\n",
              "      <td>0.687138</td>\n",
              "      <td>0.599073</td>\n",
              "      <td>0.512167</td>\n",
              "      <td>0.427578</td>\n",
              "      <td>0.395133</td>\n",
              "      <td>0.402086</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>4.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>5 rows × 188 columns</p>\n",
              "</div>"
            ],
            "text/plain": [
              "            0         1         2         3         4         5         6    \\\n",
              "87549  0.807018  0.494737  0.536842  0.529825  0.491228  0.484211  0.456140   \n",
              "87550  0.718333  0.605000  0.486667  0.361667  0.231667  0.120000  0.051667   \n",
              "87551  0.906122  0.624490  0.595918  0.575510  0.530612  0.481633  0.444898   \n",
              "87552  0.858228  0.645570  0.845570  0.248101  0.167089  0.131646  0.121519   \n",
              "87553  0.901506  0.845886  0.800695  0.748552  0.687138  0.599073  0.512167   \n",
              "\n",
              "            7         8         9    ...  178  179  180  181  182  183  184  \\\n",
              "87549  0.396491  0.284211  0.136842  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "87550  0.001667  0.000000  0.013333  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "87551  0.387755  0.322449  0.191837  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "87552  0.121519  0.118987  0.103797  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "87553  0.427578  0.395133  0.402086  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0   \n",
              "\n",
              "       185  186  187  \n",
              "87549  0.0  0.0  4.0  \n",
              "87550  0.0  0.0  4.0  \n",
              "87551  0.0  0.0  4.0  \n",
              "87552  0.0  0.0  4.0  \n",
              "87553  0.0  0.0  4.0  \n",
              "\n",
              "[5 rows x 188 columns]"
            ]
          },
          "execution_count": 12,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_hb_train.tail(5)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "9ZmsQuapHNlR"
      },
      "outputs": [],
      "source": [
        "# omit last column as y\n",
        "x_train = df_hb_train.iloc[:,:187]\n",
        "x_test = df_hb_test.iloc[:,:187]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "jSAcFNo4HNlR"
      },
      "outputs": [],
      "source": [
        "# For exploratory purpose only\n",
        "gasf = GramianAngularField(image_size=187, method='summation')\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kxkphpFqHNlR",
        "outputId": "fdc0f0d4-8ab7-461a-fefd-a68b0c85690e"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "GramianAngularField(image_size=187)"
            ]
          },
          "execution_count": 15,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "gasf"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "3aXV9yoTHNlS",
        "outputId": "59998ad8-37b4-4257-857d-c5557d1c7422"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "pyts.image.gaf.GramianAngularField"
            ]
          },
          "execution_count": 16,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "type(gasf)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "uATuFYzFHNlS",
        "outputId": "ff44278a-b213-4e10-856e-7fefcdc85bf1"
      },
      "outputs": [
        {
          "ename": "AttributeError",
          "evalue": "'GramianAngularField' object has no attribute 'shape'",
          "output_type": "error",
          "traceback": [
            "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
            "\u001b[1;32m<ipython-input-17-e24f15377b52>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mgasf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
            "\u001b[1;31mAttributeError\u001b[0m: 'GramianAngularField' object has no attribute 'shape'"
          ]
        }
      ],
      "source": [
        "gasf.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "w1B5TFfKHNlS"
      },
      "outputs": [],
      "source": [
        "x_gasf_train = gasf.fit_transform(x_train)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-HdFTy_oHNlS",
        "outputId": "abca025b-b969-4993-89f0-5b6b6e6d15e1"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(87554, 187, 187)"
            ]
          },
          "execution_count": 19,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_gasf_train.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "A3vlQBw4HNlS"
      },
      "outputs": [],
      "source": [
        "x_gasf_test = gasf.transform(x_test)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-vk_QFokHNlS",
        "outputId": "e0e74639-9194-40e7-80e6-cbda3a8df34d"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "array([[ 0.28965888,  0.12514941,  0.00677734, ..., -0.80301273,\n",
              "        -0.80301273, -0.80301273],\n",
              "       [ 0.12514941, -0.04290041, -0.16091198, ..., -0.69177294,\n",
              "        -0.69177294, -0.69177294],\n",
              "       [ 0.00677734, -0.16091198, -0.27665898, ..., -0.60139048,\n",
              "        -0.60139048, -0.60139048],\n",
              "       ...,\n",
              "       [-0.80301273, -0.69177294, -0.60139048, ...,  1.        ,\n",
              "         1.        ,  1.        ],\n",
              "       [-0.80301273, -0.69177294, -0.60139048, ...,  1.        ,\n",
              "         1.        ,  1.        ],\n",
              "       [-0.80301273, -0.69177294, -0.60139048, ...,  1.        ,\n",
              "         1.        ,  1.        ]])"
            ]
          },
          "execution_count": 20,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_gasf_train[87553]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "2IU6VhlaHNlS",
        "outputId": "1e07dba8-6b52-4b45-e0bc-c03134d183f1"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(187,)"
            ]
          },
          "execution_count": 21,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_train.values[87553, :].shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "2iiTpq0nHNlS",
        "outputId": "1d24d292-fc0c-46e5-8a5d-194c5196d8a2"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x29d8414ccc8>]"
            ]
          },
          "execution_count": 22,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgo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/t9sW5AdhjjGmLHcil93ESu+/Knu0H1iiCV7F+I37K7vZE2/RarD8JXwJ2RD9uAR4CXo4e3wDMs7GNS7BGDrwI7Iy9d0At8FtgX/TfGhvbWAZ0A5Vxx2x/D7F+wbQDIaze43tmet+wygX3Rb8/XwZabGrffqw6dOz78f7ouW+J/v+/CLwAvNHG93DG/1vgU9H3cC9ws11tjB7/PvCBKefa8j4m+9Cp/0opVSDyreSilFJqBhroSilVIDTQlVKqQGigK6VUgdBAV0qpAqGBrpRSBUIDXSmlCsT/B6MWCvbU8vcjAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "# Plot 1 heartbeat\n",
        "x_train.values[87553, :]\n",
        "plt.plot(np.arange(187), x_train.values[87553, :])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "b0ss-VgiHNlS",
        "outputId": "c540c2a5-3515-4ca8-b135-5bbd21189db9"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<matplotlib.image.AxesImage at 0x29d84201d48>"
            ]
          },
          "execution_count": 23,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD4CAYAAADsBlOYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO19e6xkSXnf7+v3fc6dmfuYYZbdWWywbKxkY9A6EjLGcWweirzeSBBQZGMbvFiCSJHyh8GRYsuRJZSYIEeOcRYbAZINXkKwkUWI0UqAIoUsu5iw+LFhH7PL3Zm5877Pfnflj+6v7tffrTp9uvv03J7p7ye1Tp9z6tSpc07Vr75XVZFzDgaDYXa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593UAN9Th2HM9BODTrotvAFghorO3p6TjIfKcMTwE4LPOubpz7gUAz6Jbx6cax00CoTEG546pLJOCA/BXRPRUb7wEAGw45y4BQG+7fmylyxax57obv/MHeqrNJ4Q6d0c+53GTQGgI3N3ms3yDc+7H0BWJ309EbzzuAh0D7rbv/DEAPwDgAQCXAHykd/yOfM7jJoGhxhjciXDOXextrwD4Arri4RaLw73t3TJnVuy57qrv7Jzbcs61nXMdAB/Hoch/Rz7ncZPAXT3GgIgWiGiJ/wP4WQDfRfcZ391L9m4Af3E8Jcwcsef6IoBf7HkJ/jGAbVYb7kQoe8bD6H5ToPuc7ySiMhHdj64h9InbXb5hcaxzDM7AGIMNAF/ojYcvAPhT59yXieibAB4jovcAeAnA24+xjCOBiD4D4E0AVoloE8BvAvgwws/1JQBvQ9dQdgDgl297gUdE5DnfREQPoCvqXwDwPgBwzv0NET2G7uQ5LQDvd861Q/lOEyxs2GCYcRy3OmAwGI4ZRgIGw4zDSMBgmHEYCRgMMw4jAYNhxmEkYDDMOIwEDIYZx/8HChcxNqSiReoAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "# GAF for 1 heartbeat\n",
        "plt.imshow(x_gasf_train[87553], cmap='gray', origin='lower')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "8-pRsWCsHNlS",
        "outputId": "f0568f9d-cae9-4b36-a4b4-97c9a9fb3706"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(187, 187)"
            ]
          },
          "execution_count": 24,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_gasf_train[87553].shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "lXBz22sZHNlS"
      },
      "outputs": [],
      "source": [
        "#plt.imshow(x_gasf_test[21891], cmap='gray', origin='lower')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "2HRT9c4MHNlS"
      },
      "outputs": [],
      "source": [
        "def recurrence_plot(s, eps=None, steps=None):\n",
        "    result = []\n",
        "    if eps==None: eps=0.1\n",
        "    if steps==None: steps=10\n",
        "    d = pairwise_distances(s[:, None])\n",
        "    d = d / eps\n",
        "    d[d > steps] = steps\n",
        "    return d/5. - 1"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "uNik3a4hHNlS"
      },
      "outputs": [],
      "source": [
        "result = recurrence_plot(x_train.values[87553], steps=10)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "FXwisGNlHNlS",
        "outputId": "dc2bf76a-5050-48ec-f7ac-4e76e545ebdf"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(187, 187)"
            ]
          },
          "execution_count": 28,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "result.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "hGKnY84qHNlS",
        "outputId": "d4208dd6-c5d4-4e34-bb2b-54f900834d3a"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<matplotlib.image.AxesImage at 0x29d840af588>"
            ]
          },
          "execution_count": 29,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAR4AAAEYCAYAAACKkJnLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO19fawkWXXf7/R3v/f6vZ3PnWHAO7OItWWiZCEjbInYItnYBuSwIZEdNpZNbMTakpFs2ZFYG8lGliz5C1uynOAsBgERBuxgZGThBIRso0jBZsEL7BrWLHhmdz72fc1Mv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eMFQUQlAG8C8KfDVVn3Qxoyv0eI6F0AugA+Mlw18RdyjwCxvp/Fs3LgLwWPw6yJ5wqAl4nllwK4lsWBiaiIAel8xDn3ZwDgnFt1zvWcc30A78MRmLJpcM5dG/5fA/DJ4fFW2ZUY/l+bZhuGeAOALzvnVoftybQfhoidd6b3CBG9FcAPA/gxNxQ2XIZfyE3p+6z7YapfCp418XwRwCuI6MLwrfsWAJ+a9kGHvuv7AXzdOfe7Yr3UDt4M4Cm97xG2YZGIavwbA2HzKQzO/63Dzd4K4M+n1QaBxJsty34QiJ33pwD8xDC69b0A6uySHTWI6PUA3gngTc65PbE+sy/kpvT9pwC8hYjKRHRh2Ia/m0Ybhpjul4KPWqk/gKr+RgyiSt8C8K6MjvmvMDBTvwrgyeHfGwH8TwBfG67/FICzU2zD/RhEKb4C4Gk+dwAnAHwOwDeH/49PuS8WAGwCWBHrptoPGJDcdQAdDN7kb4udNwYuxn8b3h9fA3Bxim14FgMdhe+JPxxu+x+H1+grAL4M4N9NsQ3RvgfwrmE/PAPgDdNqw3D9BzH4ErDc9sj6wYZMGAyGzDFrV8tgMLwIYcRjMBgyhxGPwWDIHEY8BoMhcxjxGAyGzGHEYzAYMocRj8FgyBz/H26gyuH/gbUaAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 1080x1008 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "# Recurrence plot for 1 heartbeat\n",
        "fig = plt.figure(figsize=(15,14))\n",
        "ax = fig.add_subplot(2, 3, 1)\n",
        "ax.imshow(result, cmap='gray')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Ln6vmnphHNlT",
        "outputId": "bb6de448-6b7b-495a-8220-f0e7b5adb54f"
      },
      "outputs": [
        {
          "ename": "ValueError",
          "evalue": "Found array with dim 3. check_pairwise_arrays expected <= 2.",
          "output_type": "error",
          "traceback": [
            "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
            "\u001b[1;32m<ipython-input-30-bd1eb50de03c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[0mfig\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfigure\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfigsize\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m15\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m14\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[0max\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfig\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd_subplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m3\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 4\u001b[1;33m \u001b[0max\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mimshow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrecurrence_plot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_train\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m25\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcmap\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'gray'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      5\u001b[0m \u001b[0md\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mrecurrence_plot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_train\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m25\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      6\u001b[0m \u001b[0mscaler\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mMinMaxScaler\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m<ipython-input-26-e80e1fe4f0af>\u001b[0m in \u001b[0;36mrecurrence_plot\u001b[1;34m(s, eps, steps)\u001b[0m\n\u001b[0;32m      3\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0meps\u001b[0m\u001b[1;33m==\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0meps\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m==\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m     \u001b[0md\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpairwise_distances\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      6\u001b[0m     \u001b[0md\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0md\u001b[0m \u001b[1;33m/\u001b[0m \u001b[0meps\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      7\u001b[0m     \u001b[0md\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0md\u001b[0m \u001b[1;33m>\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msteps\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py\u001b[0m in \u001b[0;36minner_f\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m     71\u001b[0m                           FutureWarning)\n\u001b[0;32m     72\u001b[0m         \u001b[0mkwargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[0mk\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msig\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 73\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     74\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0minner_f\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     75\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\pairwise.py\u001b[0m in \u001b[0;36mpairwise_distances\u001b[1;34m(X, Y, metric, n_jobs, force_all_finite, **kwds)\u001b[0m\n\u001b[0;32m   1773\u001b[0m         \u001b[0mfunc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpartial\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdistance\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcdist\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmetric\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmetric\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1774\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1775\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0m_parallel_pairwise\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mY\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mn_jobs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1776\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1777\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\pairwise.py\u001b[0m in \u001b[0;36m_parallel_pairwise\u001b[1;34m(X, Y, func, n_jobs, **kwds)\u001b[0m\n\u001b[0;32m   1357\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1358\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0meffective_n_jobs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn_jobs\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1359\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mY\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1360\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1361\u001b[0m     \u001b[1;31m# enforce a threading backend to prevent data communication overhead\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py\u001b[0m in \u001b[0;36minner_f\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m     71\u001b[0m                           FutureWarning)\n\u001b[0;32m     72\u001b[0m         \u001b[0mkwargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[0mk\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msig\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 73\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     74\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0minner_f\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     75\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\pairwise.py\u001b[0m in \u001b[0;36meuclidean_distances\u001b[1;34m(X, Y, Y_norm_squared, squared, X_norm_squared)\u001b[0m\n\u001b[0;32m    266\u001b[0m     \u001b[0mpaired_distances\u001b[0m \u001b[1;33m:\u001b[0m \u001b[0mdistances\u001b[0m \u001b[0mbetweens\u001b[0m \u001b[0mpairs\u001b[0m \u001b[0mof\u001b[0m \u001b[0melements\u001b[0m \u001b[0mof\u001b[0m \u001b[0mX\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mY\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    267\u001b[0m     \"\"\"\n\u001b[1;32m--> 268\u001b[1;33m     \u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mY\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcheck_pairwise_arrays\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mX\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mY\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    269\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    270\u001b[0m     \u001b[1;31m# If norms are passed as float32, they are unused. If arrays are passed as\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py\u001b[0m in \u001b[0;36minner_f\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m     71\u001b[0m                           FutureWarning)\n\u001b[0;32m     72\u001b[0m         \u001b[0mkwargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[0mk\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msig\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 73\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     74\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0minner_f\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     75\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\metrics\\pairwise.py\u001b[0m in \u001b[0;36mcheck_pairwise_arrays\u001b[1;34m(X, Y, precomputed, dtype, accept_sparse, force_all_finite, copy)\u001b[0m\n\u001b[0;32m    140\u001b[0m         X = Y = check_array(X, accept_sparse=accept_sparse, dtype=dtype,\n\u001b[0;32m    141\u001b[0m                             \u001b[0mcopy\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mforce_all_finite\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mforce_all_finite\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 142\u001b[1;33m                             estimator=estimator)\n\u001b[0m\u001b[0;32m    143\u001b[0m     \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    144\u001b[0m         X = check_array(X, accept_sparse=accept_sparse, dtype=dtype,\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py\u001b[0m in \u001b[0;36minner_f\u001b[1;34m(*args, **kwargs)\u001b[0m\n\u001b[0;32m     71\u001b[0m                           FutureWarning)\n\u001b[0;32m     72\u001b[0m         \u001b[0mkwargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[0mk\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mk\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0marg\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msig\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparameters\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 73\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     74\u001b[0m     \u001b[1;32mreturn\u001b[0m \u001b[0minner_f\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     75\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;32m~\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\validation.py\u001b[0m in \u001b[0;36mcheck_array\u001b[1;34m(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)\u001b[0m\n\u001b[0;32m    640\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mallow_nd\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0marray\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[1;33m>=\u001b[0m \u001b[1;36m3\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    641\u001b[0m             raise ValueError(\"Found array with dim %d. %s expected <= 2.\"\n\u001b[1;32m--> 642\u001b[1;33m                              % (array.ndim, estimator_name))\n\u001b[0m\u001b[0;32m    643\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    644\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mforce_all_finite\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
            "\u001b[1;31mValueError\u001b[0m: Found array with dim 3. check_pairwise_arrays expected <= 2."
          ]
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAASMAAAF9CAYAAABPpA6qAAAABHNCSVQICAgIfAhkiAAAAAlwSF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wDfBvZMrPkj4JPjyweAL2zmTJu0h3cCvzC+/P6fxT2M110GfB04Acxv9dwbeBx2A48BvzQ+fuNWz73BfRwB3j++vAd4aqvnnpjvt4AbgCfWuP1W4AFG7z98G/DwkPvd7DOjWfgoybp7qKoHq+pH48MTjN6L1cmQxwHgo8DHgBcu5HADDdnDHcDhqnoOoKqevcAzDjFkHwW8dnz5dbzyfX1bqqq+zirvI1xhP/DZGjkBvD7Jm9a7382O0Sx8lGTIHla6ndF/FTpZdw9Jrgd2VdVXLuRg52HI43ANcE2Sh5KcSLL3gk033JB9fAS4Lckyo79if/DCjDY15/s7Awz80/6rMLWPkmyhwfMluQ2YB96xqROdv3PuIclFjP7fFt57oQbagCGPww5GT9VuYnR2+q9Jrquq/97k2c7HkH0cBD5dVX+V5DcZvYfvuqr6n80fbyo29Du92WdG5/NREs71UZItNGQPJLkZuBvYV1U/vkCzDbXeHi4DrgO+luQpRs/zF5q9iD30Z+nLVfVSVX0XOM0oTp0M2cftwFGAqvoG8BpGn1v7WTHod+YVNvmFrh3AGeBq/v/Ful+dWPMBfvoF7KNb/QLdBvZwPaMXJXdv9bwb3cPE+q/R7wXsIY/DXuAz48uXM3qq8Iatnn0D+3gAeO/48lvHv8jZ6tknZryKtV/A/l1++gXsbw66zwsw9K3Av41/We8eX3cvozMIGFX/i8AS8E3gLVv9P/QG9vDPwH8B3xr/W9jqmc93DxNr28Vo4OMQ4K+BU8B3gANbPfMG97EHeGgcqm8Bv7PVM0/Mfx/wPeAlRmdBtwPvA9634nE4PN7fd4b+LPkObEkt+A5sSS0YI0ktGCNJLRgjSS0YI0ktGCNJLRgjSS0YI0kt/C+/vmtXIUGE+QAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 1080x1008 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "# Test\n",
        "fig = plt.figure(figsize=(15,14))\n",
        "ax = fig.add_subplot(2, 3, 1)\n",
        "ax.imshow(recurrence_plot(x_train.values[25][:, None], steps=10), cmap='gray')\n",
        "d = recurrence_plot(x_train.values[25][:, None], steps=10)\n",
        "scaler = MinMaxScaler((-1, 1))\n",
        "x = scaler.fit_transform(d.reshape(187 * 187, 1))\n",
        "x"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "UWP6Rz7QHNlT"
      },
      "outputs": [],
      "source": [
        "y_train = df_hb_train[187].values.astype(int)\n",
        "y_test = df_hb_test[187].values.astype(int)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "62VqPe7YHNlT"
      },
      "outputs": [],
      "source": [
        "# upsampling to reduce class imbalance\n",
        "smt2 = SMOTE(sampling_strategy={1: 30000, 2: 20000, 3: 20000, 4: 10000}, n_jobs=-1, random_state=42)\n",
        "x_train_2, y_train_2 = smt2.fit_sample(x_train, y_train)\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "H3oNqqbeHNlT",
        "outputId": "6d9f2468-6ffd-4a09-9e93-32cd87b8a9e7"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(87554, 187)"
            ]
          },
          "execution_count": 34,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_train.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "aPYuE39vHNlT",
        "outputId": "5422a7af-4276-4cf0-b873-5242642b079c"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "(152471, 187)"
            ]
          },
          "execution_count": 35,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "x_train_2.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "wOeE-wmVHNlT"
      },
      "outputs": [],
      "source": [
        "gasf = GramianAngularField(image_size=150, method='summation')\n",
        "x_gasf_train_2 = gasf.fit_transform(x_train_2)\n",
        "x_gasf_test_2 = gasf.transform(x_test)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "O9LEGxcoHNlT"
      },
      "outputs": [],
      "source": [
        "# create placeholders, then populate with images\n",
        "with h5py.File('hb_data_mit_bih_balanced_2.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_gasf_train_2), 224, 224), np.float32)  # 224, 224 for resnet\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_2),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_gasf_test_2), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_gasf_train_2, y_train_2)):\n",
        "        image = Image.fromarray(x.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, ...] = t\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_gasf_test_2, y_test)):\n",
        "        image = Image.fromarray(x.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, ...] = t\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "d06EAdkBHNlT"
      },
      "outputs": [],
      "source": [
        "# upsampling to try with GramianAngularField method='difference'\n",
        "# results are almost same for both\n",
        "smt3 = SMOTE(sampling_strategy={1: 30000, 2: 20000, 3: 20000, 4: 10000}, n_jobs=-1, random_state=42)\n",
        "x_train_3, y_train_3 = smt3.fit_sample(x_train, y_train)\n",
        "\n",
        "gasf = GramianAngularField(image_size=150, method='difference')\n",
        "x_gasf_train_3 = gasf.fit_transform(x_train_3)\n",
        "x_gasf_test_3 = gasf.transform(x_test)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "6X47mLmaHNlT"
      },
      "outputs": [],
      "source": [
        "with h5py.File('hb_data_mit_bih_balanced_3.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_gasf_train_3), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_3),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_gasf_test_3), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_gasf_train_3, y_train_3)):\n",
        "        image = Image.fromarray(x.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, ...] = t\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_gasf_test_3, y_test)):\n",
        "        image = Image.fromarray(x.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, ...] = t\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "g6OhrgTBHNlU"
      },
      "outputs": [],
      "source": [
        "with h5py.File('hb_data_mit_bih_balanced_rp.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_train_2), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_2),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_test), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_train_2.values, y_train_2)):\n",
        "        r = recurrence_plot(x, steps=10)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, ...] = t\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_test.values, y_test)):\n",
        "        r = recurrence_plot(x, steps=10)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, ...] = t\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "qJMlXitwHNlU"
      },
      "outputs": [],
      "source": [
        "# Generating mixed hdf5: containing RP, GAF and mean of RP and GAF in 3 channels\n",
        "# Previous ones were single channel images\n",
        "with h5py.File('/media/asif/data/hb_data_mit_bih_balanced_mixed.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_train_3), 3, 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_3),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_test), 3, 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x1, x2, y) in enumerate(zip(x_gasf_train_3, x_train_3.values, y_train_3)):\n",
        "        image = Image.fromarray(x1.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        r = recurrence_plot(x2, steps=10)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t2 = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, 0, ...] = t\n",
        "        hdf5_file[\"x_train\"][i, 1, ...] = t2\n",
        "        hdf5_file[\"x_train\"][i, 2, ...] = (t + t2) / 2\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x1, x2, y) in enumerate(zip(x_gasf_test_3, x_test.values, y_test)):\n",
        "        image = Image.fromarray(x1.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        r = recurrence_plot(x2, steps=10)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t2 = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, 0, ...] = t\n",
        "        hdf5_file[\"x_test\"][i, 1, ...] = t2\n",
        "        hdf5_file[\"x_test\"][i, 2, ...] = (t + t2) / 2\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "rVo-KMYhHNlU"
      },
      "outputs": [],
      "source": [
        "# Hearbeat values range from 0 to 1; we will divide into quantiles and see which bin each value belongs to\n",
        "# and what the probability is to transfer from 1 bin to other\n",
        "# i.e if 1 value is in bin 1 and the next value is in bin 5, what is the probability of transferring from\n",
        "# bin 1 to 5\n",
        "# correlation matrix of probabilities is markov transition field\n",
        "def get_quantiles(min_value=0, max_val=1, k=10):\n",
        "    c = (max_val - min_value)/k\n",
        "    b = min_value + c\n",
        "    d = []\n",
        "    for i in range(1, k):\n",
        "        d.append(b)\n",
        "        b += c\n",
        "    d.append(max_val)\n",
        "    return d\n",
        "\n",
        "quantiles = get_quantiles()\n",
        "\n",
        "def value_to_quantile(x):\n",
        "    for i, k in enumerate(quantiles):\n",
        "        if x <= k:\n",
        "            return i\n",
        "    return 0\n",
        "\n",
        "# qv_train = np.vectorize(value_to_quantile)(x_train_3.values)\n",
        "# qv_test = np.vectorize(value_to_quantile)(x_test.values)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "F1keZPWSHNlU"
      },
      "outputs": [],
      "source": [
        "def get_mtf(x, size=10):\n",
        "    q = np.vectorize(value_to_quantile)(x)\n",
        "    r = np.zeros((q.shape[0], q.shape[0]))\n",
        "    y = np.zeros((size, size))\n",
        "    for i in range(x.shape[0] - 1):\n",
        "        y[q[i], q[i + 1]] += 1\n",
        "    y = y / y.sum(axis=1, keepdims=True)\n",
        "    y[np.isnan(y)] = 0\n",
        "\n",
        "    for i in range(r.shape[0]):\n",
        "        for j in range(r.shape[1]):\n",
        "            r[i, j] = y[q[i], q[j]]\n",
        "    return r / 5. - 1"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Td6AhzYvHNlU",
        "outputId": "9381d88a-d4be-44ca-c215-e48e0909a2e4"
      },
      "outputs": [
        {
          "ename": "NameError",
          "evalue": "name 'x_train_3' is not defined",
          "output_type": "error",
          "traceback": [
            "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
            "\u001b[1;32m<ipython-input-34-9f0902006b4f>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;31m# MTF for 1 image\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mget_mtf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx_train_3\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
            "\u001b[1;31mNameError\u001b[0m: name 'x_train_3' is not defined"
          ]
        }
      ],
      "source": [
        "# MTF for 1 image\n",
        "get_mtf(x_train_3.values[0])"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Pk-gB1SiHNlU"
      },
      "outputs": [],
      "source": [
        "plt.imshow(get_mtf(x_train_3.values[0]), cmap='gray', origin='lower')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "rSXSAUCHHNlU"
      },
      "outputs": [],
      "source": [
        "np.seterr(divide='ignore', invalid='ignore')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "81BfN_VvHNlU"
      },
      "outputs": [],
      "source": [
        "smt3 = SMOTE(sampling_strategy={1: 30000, 2: 20000, 3: 20000, 4: 10000}, n_jobs=-1, random_state=42)\n",
        "x_train_3, y_train_3 = smt3.fit_sample(x_train, y_train)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "92IXAwvqHNlU"
      },
      "outputs": [],
      "source": [
        "with h5py.File('/media/asif/data/hb_data_mit_bih_balanced_mtf.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_train_3), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_3),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_test), 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_train_3.values, y_train_3)):\n",
        "        mtf = get_mtf(x)\n",
        "        image = Image.fromarray(mtf.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, ...] = t\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x, y) in enumerate(zip(x_test.values, y_test)):\n",
        "        mtf = get_mtf(x)\n",
        "        image = Image.fromarray(mtf.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, ...] = t\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "aKEnPVRKHNlU"
      },
      "outputs": [],
      "source": [
        "# 3 channels, this time with GAF, RP and MTF\n",
        "with h5py.File('/media/asif/data/hb_data_mit_bih_balanced_gaf_rp_mtf.hdf5', mode='w') as hdf5_file:\n",
        "    hdf5_file.create_dataset(\"x_train\", (len(x_train_3), 3, 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_train\", (len(y_train_3),), np.int32)\n",
        "    hdf5_file.create_dataset(\"x_test\", (len(x_test), 3, 224, 224), np.float32)\n",
        "    hdf5_file.create_dataset(\"y_test\", (len(y_test),), np.int32)\n",
        "\n",
        "    transform = transforms.Compose([transforms.Resize((224, 224))])\n",
        "\n",
        "    for i, (x1, x2, y) in enumerate(zip(x_gasf_train_3, x_train_3.values, y_train_3)):\n",
        "        image = Image.fromarray(x1.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        r = recurrence_plot(x2, steps=10)\n",
        "        mtf = get_mtf(x2)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t2 = np.array(transform(image))\n",
        "        image = Image.fromarray(mtf.astype(float))\n",
        "        t3 = np.array(transform(image))\n",
        "        hdf5_file[\"x_train\"][i, 0, ...] = t\n",
        "        hdf5_file[\"x_train\"][i, 1, ...] = t2\n",
        "        hdf5_file[\"x_train\"][i, 2, ...] = t3\n",
        "        hdf5_file[\"y_train\"][i] = y\n",
        "\n",
        "    for i, (x1, x2, y) in enumerate(zip(x_gasf_test_3, x_test.values, y_test)):\n",
        "        image = Image.fromarray(x1.astype(float))\n",
        "        t = np.array(transform(image))\n",
        "        r = recurrence_plot(x2, steps=10)\n",
        "        mtf = get_mtf(x2)\n",
        "        image = Image.fromarray(r.astype(float))\n",
        "        t2 = np.array(transform(image))\n",
        "        image = Image.fromarray(mtf.astype(float))\n",
        "        t3 = np.array(transform(image))\n",
        "        hdf5_file[\"x_test\"][i, 0, ...] = t\n",
        "        hdf5_file[\"x_test\"][i, 1, ...] = t2\n",
        "        hdf5_file[\"x_test\"][i, 2, ...] = t3\n",
        "        hdf5_file[\"y_test\"][i] = y"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.4"
    },
    "colab": {
      "provenance": []
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}